import java.util.Scanner;

public class C_1_31 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()){
            int numMax = -1;
            int l,f,ll,ff;
            l = sc.nextInt();
            f = sc.nextInt();
            ll=l;
            ff=f;

            if (f<l){
                int temp = f;
                f = l;
                l = temp;
            }
            for (int i = l; i <= f; i++) {
                int t = i;
                int num = 1;
                while (true){
                    if (t%2==1){
                        t = t*3+1;
                    }else {
                        t = t/2;
                    }
                    num++;
                    if (t==1)
                        break;
            }
                numMax = Math.max(num, numMax);
            }
            System.out.print(ll);
            System.out.print(" ");
            System.out.print(ff);
            System.out.print(" ");
            System.out.print(numMax);
            System.out.println();
        }
    }
}
